//
//  UILabel+EX.swift
//  sinaWeibo
//
//  Created by 董艳武 on 16/2/20.
//  Copyright © 2016年 董艳武. All rights reserved.
//

import UIKit
extension UILabel {
    // MARK:--函数的属性 给定默认值 可以不传属性
    convenience init(fontSize:CGFloat,alignment:NSTextAlignment,contentColor:UIColor,isSizeToFit:Bool = true,lineCount:Int,labelText:String? = "") {
        self.init()
        
        if labelText != nil {
            text = labelText
        }

        font = UIFont.systemFontOfSize(fontSize)
        textAlignment = NSTextAlignment.Left
        textColor = contentColor
        numberOfLines = lineCount
        if isSizeToFit == true {
            sizeToFit()
        }
    }
    
}
